#include <iostream>
#include <cstdio>
#include <cstring>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
using namespace std;
#define ldb long double
#define ll long long
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define ff first
#define ss second
#define nextLine() {int c = 0; while ((c = getchar()) != 10 && c != EOF); }
const ldb pi = fabsl(atan2l(0.0, -1.0));
const ldb eps = 1e-9;
const int inf = 1 << 28;


int p;

void load()
{
	cin >> p;
}

void solve()
{
	int res = 0;
	for (int i = p + 1; i <= 10000; i++)
	{
		for (int j = i; j <= 10000; j++)
		{
			if ((i * j) % ((i - p) * (j - p)) == 0)
			{
				if (i == j) res++;
				else res += 2;
			}
	   	}
	}
	cout << res;
}

#define file "short"

int main()
{
	#ifndef ONLINE_JUDGE
		freopen(file".in", "rt", stdin);
		freopen(file".out", "wt", stdout);
  	#endif
  	load();
  	solve();
  	return 0;
}
